﻿namespace StudentOverrides
{
    using Enumerations;

    public class Student
    {
        public string FirstName { get; set; }
        public string MiddleName { get; set; }
        public string LastName { get; set; }
        public int SSN { get; set; }
        public string PermanentAddress { get; set; }
        public string MobilePhone { get; set; }
        public string Email { get; set; }
        public string Course { get; set; }
        public SpecialitiesEnum Speciality { get; set; }
        public UniversitiesEnum University { get; set; }
        public FacultyEnum Faculty { get; set; }

        public override bool Equals(object studentToCompare)
        {
            var tempVarStudent = studentToCompare as Student;
            return this.SSN == tempVarStudent.SSN;
        }

        public override int GetHashCode()
        {
            return this.FirstName.GetHashCode() ^ this.SSN.GetHashCode();
        }

        public override string ToString()
        {
            return this.FirstName + " " + this.MiddleName + " " + this.LastName;
        }
    }
}